<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>五壮士车库</title>
  <script src="js/jquery-1.8.2.js"></script>
  <script src="layui/layui.js"></script>
  <link rel="stylesheet" href="layui/css/layui.css" media="all">
 
  
</head>
<body class="layui-layout-body">

<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<div class="layui-logo">五壮士车库</div>
<!-- 头部区域（可配合layui已有的水平导航） -->
 <ul class="layui-nav layui-layout-left" lay-filter="">
  
  <li class="layui-nav-item "><a href="lbt.html">首页</a></li>
   <li class="layui-nav-item "><a href="gywm.html">关于我们</a></li>
  <li class="layui-nav-item layui-this"><a href="car.html">产品</a></li>
  <li class="layui-nav-item"><a href="xw.html">新闻</a></li>
  <li class="layui-nav-item"><a href="lxwm.html">联系我们</a></li>
</ul>
 </div>
</div>
<br>
<br>
<br>
<br>
<br>
<div class="layui-container"> 
<div class="layui-fluid layadmin-cmdlist-fluid">
  <div class="layui-row layui-col-space30"id="box">
  
    
 
 
    
  </div>
</div>


 

</div>

<!-- 条目中可以是任意内容，如：<img src=""> -->
 

<script>

    $.ajax({
		url : "/wzsck/CarQueryServlet",//地址
		type : "get",//请求方式
		
			success : function(res) {
					var list= res.data;	
					for(var i=0;i<list.length;i++){
						$("#box").append(
								" <div class='layui-col-md2 layui-col-sm2'>"
								+" <div class='cmdlist-container'>"
							     +  "<a href='javascript:;''>"   
							     +"<img src ='"+"/wzsck/"+list[i].imgurl+"' >"
							      + " </a>"    
							      + "<a href='javascript:;''>"
							        +   " <div class='cmdlist-text'>"
							        +   " <h3>"+list[i].name+"</h3>"
							        + "<p class='info'>"+list[i].describe+"</p>"
							        +   " <div class='price'>"
							        + "<b>￥"+list[i].price+"元</b>"
							         +  " </div>"
							         +  "</div>"
							          + " </a>"
							           +"</div>"
							           +"</div>"       
						);
						if(i%6-5==0){
							$("#box").append("."
								     
							);
						}
					}

				
		}
		})


</script>

</body>
</html>